﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FeedBackEdit.aspx.cs" Inherits="HumanResorcesProj.GUI.Extensions.FeedBackEdit" MasterPageFile="~/GUI/MasterFeedBacks.Master" %>

<asp:Content ID="Content1" runat="server" 
    contentplaceholderid="ContentPlaceHolder1">
    
    
    
    
    
    <table style="width:100%;" dir="rtl">
    <tr>
                        <td align="left" style="width: 85px">
                            &nbsp;</td>
                <td class="style8" 
            style="width: 74px; text-align: left; font-weight: bold" colspan="0" dir="rtl">
                            שם&nbsp; העובד:&nbsp;
                        </td>
                <td style="width: 98px">
                    <asp:Label ID="EmpNameTextBox" runat="server" Font-Underline="True" 
                        Text="Label"></asp:Label>
        </td>
                <td style="text-align: left; width: 11px;">
                    &nbsp;</td>
                <td colspan="0" style="text-align: left">
                    <b dir="rtl">תז:&nbsp;
                        </b>
        </td>
                <td>
                    <asp:Label ID="EmpIDtEXbOX" runat="server" Font-Underline="True" Text="Label"></asp:Label>
        </td>
                <td class="style9" style="text-align: left; font-weight: bold" colspan="2">
                            &nbsp;</td>
                <td class="style4">
                    &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
                        <td align="left" style="width: 85px">
                            &nbsp;</td>
                <td class="style8" 
            style="text-align: left; font-weight: bold" colspan="2" dir="rtl">
                            &nbsp;</td>
                <td colspan="4" dir="rtl">
                    &nbsp;</td>
                <td class="style9" style="text-align: left; font-weight: bold" colspan="2">
                            &nbsp;</td>
                <td class="style4">
                    &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr style="background-image: url('../../../pic/MainWindow/MainWindow94.png')">
        <td style="width: 85px">
            &nbsp;</td>
        <td colspan="2">
            &nbsp;</td>
        <td colspan="7">
            <asp:GridView ID="GridView1" runat="server" AllowSorting="True" 
                AutoGenerateColumns="False" DataKeyNames="SerialNum" 
                
                 
                DataSourceID="SqlDataSource1" Width="294px" CellPadding="2" 
                ForeColor="Black" GridLines="None" BackColor="LightGoldenrodYellow" 
                BorderColor="Tan" BorderWidth="1px">
                <Columns>
                    <asp:CommandField SelectText="בחר" ShowSelectButton="True" />
                    <asp:BoundField DataField="ConvSummary" HeaderText="נושא שיחה" 
                        SortExpression="ConvSummary" />
                    <asp:BoundField DataField="ConvDate" HeaderText="תאריך שיחה" 
                        SortExpression="ConvDate" />
                    <asp:BoundField DataField="SerialNum" HeaderText="SerialNum" ReadOnly="True" 
                        SortExpression="SerialNum" Visible="False" />
                </Columns>
                <FooterStyle BackColor="Tan" />

<PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" HorizontalAlign="Center"></PagerStyle>

                <SelectedRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                <HeaderStyle BackColor="Tan" Font-Bold="True" />

<AlternatingRowStyle BackColor="PaleGoldenrod"></AlternatingRowStyle>
            </asp:GridView>
            <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                ConnectionString="<%$ ConnectionStrings:Eden-DatabaseConnectionString3 %>" 
                SelectCommand="SELECT [ConvSummary], [ConvDate], [SerialNum] FROM [EmpConversation] WHERE ([EmpID] = @EmpID)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="EmpIDtEXbOX" Name="EmpID" PropertyName="Text" 
                        Type="String" />
                </SelectParameters>
            </asp:SqlDataSource>
        </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td style="width: 85px">
            &nbsp;</td>
        <td colspan="2">
            &nbsp;</td>
        <td colspan="7">
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td bgcolor="Tan" colspan="11">
            &nbsp;</td>
    </tr>
    <tr>
        <td colspan="10" style="height: 23px">
            <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
                ConflictDetection="CompareAllValues" 
                ConnectionString="<%$ ConnectionStrings:Eden-DatabaseConnectionString3 %>" 
                DeleteCommand="DELETE FROM EmpConversation WHERE (SerialNum = @original_SerialNum)" 
                InsertCommand="INSERT INTO [EmpConversation] , [SerialNum], [InitiatorName], [ConvDate], [ConvLocation], [PresentInDiscussion], [ConversationContext], [ConvSummary]) VALUES (, @SerialNum, @InitiatorName, @ConvDate, @ConvLocation, @PresentInDiscussion, @ConversationContext, @ConvSummary)" 
                OldValuesParameterFormatString="original_{0}" 
                SelectCommand="SELECT * FROM [EmpConversation] WHERE ([SerialNum] = @SerialNum)" 
                
                
                UpdateCommand="UPDATE EmpConversation SET  InitiatorName = @InitiatorName, ConvDate = @ConvDate, ConvLocation = @ConvLocation, PresentInDiscussion = @PresentInDiscussion, ConversationContext = @ConversationContext, ConvSummary = @ConvSummary WHERE (SerialNum = @original_SerialNum)">
                <SelectParameters>
                    <asp:ControlParameter ControlID="GridView1" Name="SerialNum" 
                        PropertyName="SelectedValue" Type="Object" />
                </SelectParameters>
                <DeleteParameters>
                    <asp:Parameter Name="original_SerialNum" Type="Object" />
                </DeleteParameters>
                <UpdateParameters>
                    <asp:Parameter Name="InitiatorName" Type="String" />
                    <asp:Parameter Name="ConvDate" Type="String" />
                    <asp:Parameter Name="ConvLocation" Type="String" />
                    <asp:Parameter Name="PresentInDiscussion" Type="String" />
                    <asp:Parameter Name="ConversationContext" Type="String" />
                    <asp:Parameter Name="ConvSummary" Type="String" />
                    <asp:Parameter Name="original_SerialNum" Type="Object" />
                </UpdateParameters>
                <InsertParameters>
                    <asp:Parameter Name="SerialNum" Type="Object" />
                    <asp:Parameter Name="InitiatorName" Type="String" />
                    <asp:Parameter Name="ConvDate" Type="String" />
                    <asp:Parameter Name="ConvLocation" Type="String" />
                    <asp:Parameter Name="PresentInDiscussion" Type="String" />
                    <asp:Parameter Name="ConversationContext" Type="String" />
                    <asp:Parameter Name="ConvSummary" Type="String" />
                </InsertParameters>
            </asp:SqlDataSource>
        </td>
        <td style="height: 23px">
            </td>
    </tr>
    <tr>
        <td colspan="2" style="height: 23px">
            &nbsp;</td>
        <td colspan="2" style="height: 23px">
            &nbsp;</td>
        <td colspan="4" style="height: 23px">
            <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                DataKeyNames="SerialNum" DataSourceID="SqlDataSource2" 
                 
 
                Height="50px" Width="244px" onitemupdated="DetailsView1_ModeChanged" 
                BackColor="LightGoldenrodYellow" BorderColor="Tan" BorderWidth="1px" 
                CellPadding="2" GridLines="None" 
                onitemdeleted="DetailsView2_ModeChanged" ForeColor="Black">
                <FooterStyle BackColor="Tan" />
                <PagerStyle BackColor="PaleGoldenrod" ForeColor="DarkSlateBlue" 
                    HorizontalAlign="Center" />
                <Fields>
                    <asp:BoundField DataField="ConvSummary" HeaderText="נושא" 
                        SortExpression="ConvSummary" />
                    <asp:BoundField DataField="ConvDate" HeaderText="תאריך" 
                        SortExpression="ConvDate" />
                    <asp:BoundField DataField="InitiatorName" HeaderText="יוזם השיחה" 
                        SortExpression="InitiatorName" />
                    <asp:BoundField DataField="SerialNum" HeaderText="SerialNum" ReadOnly="True" 
                        SortExpression="SerialNum" Visible="False" />
                    <asp:BoundField DataField="ConvLocation" HeaderText="מקום" 
                        SortExpression="ConvLocation" />
                    <asp:BoundField DataField="PresentInDiscussion" HeaderText="נוכחים" 
                        SortExpression="PresentInDiscussion" />
                    <asp:BoundField DataField="ConversationContext" HeaderText="תוכן השיחה" 
                        SortExpression="ConversationContext" />
                    <asp:TemplateField ShowHeader="False">
                        <EditItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="True" 
                                CommandName="Update" Text="עדכן"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                                CommandName="Cancel" Text="בטל"></asp:LinkButton>
                        </EditItemTemplate>
                        <ItemTemplate>
                            <asp:LinkButton ID="LinkButton1" runat="server" CausesValidation="False" 
                                CommandName="Edit" Text="ערוך"></asp:LinkButton>
                            &nbsp;<asp:LinkButton ID="LinkButton2" runat="server" CausesValidation="False" 
                            OnClientClick="return confirm('נא אשר מחיקה');" 
                                CommandName="Delete" Text="מחק"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="EmpID" HeaderText="EmpID" SortExpression="EmpID" 
                        Visible="False" />
                </Fields>
                <HeaderStyle BackColor="Tan" Font-Bold="True" />
                <EditRowStyle BackColor="DarkSlateBlue" ForeColor="GhostWhite" />
                <AlternatingRowStyle BackColor="PaleGoldenrod" />
            </asp:DetailsView>
            </td>
        <td colspan="2" style="height: 23px">
            &nbsp;</td>
        <td style="height: 23px">
            &nbsp;</td>
    </tr>
    <tr>
        <td colspan="10" style="height: 23px">
            &nbsp;</td>
        <td style="height: 23px">
            &nbsp;</td>
    </tr>
</table>
    
    
    
    
    
    </asp:Content>
    